Optimal. Leaf size=112 \[ -3 i x \text {Li}_2\left (e^{2 i x}\right )+\frac {3}{2} \text {Li}_3\left (e^{2 i x}\right )-\frac {3 x^4}{8}-i x^3-x^3 \cot (x)-\frac {1}{2} x^3 \sin (x) \cos (x)+\frac {3 x^2}{8}+3 x^2 \log \left (1-e^{2 i x}\right )-\frac {3}{4} x^2 \cos ^2(x)+\frac {3 \cos ^2(x)}{8}+\frac {3}{4} x \sin (x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 10, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.833, Rules used = {4408, 3311, 30, 3310, 3720, 3717, 2190, 2531, 2282, 6589} \[ -3 i x \text {PolyLog}\left (2,e^{2 i x}\right )+\frac {3}{2} \text {PolyLog}\left (3,e^{2 i x}\right )-\frac {3 x^4}{8}-i x^3+\frac {3 x^2}{8}+3 x^2 \log \left (1-e^{2 i x}\right )-\frac {3}{4} x^2 \cos ^2(x)-x^3 \cot (x)-\frac {1}{2} x^3 \sin (x) \cos (x)+\frac {3 \cos ^2(x)}{8}+\frac {3}{4} x \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2190
Rule 2282
Rule 2531
Rule 3310
Rule 3311
Rule 3717
Rule 3720
Rule 4408
Rule 6589
Rubi steps
\begin {align*} \int x^3 \cos ^2(x) \cot ^2(x) \, dx &=-\int x^3 \cos ^2(x) \, dx+\int x^3 \cot ^2(x) \, dx\\ &=-\frac {3}{4} x^2 \cos ^2(x)-x^3 \cot (x)-\frac {1}{2} x^3 \cos (x) \sin (x)-\frac {\int x^3 \, dx}{2}+\frac {3}{2} \int x \cos ^2(x) \, dx+3 \int x^2 \cot (x) \, dx-\int x^3 \, dx\\ &=-i x^3-\frac {3 x^4}{8}+\frac {3 \cos ^2(x)}{8}-\frac {3}{4} x^2 \cos ^2(x)-x^3 \cot (x)+\frac {3}{4} x \cos (x) \sin (x)-\frac {1}{2} x^3 \cos (x) \sin (x)-6 i \int \frac {e^{2 i x} x^2}{1-e^{2 i x}} \, dx+\frac {3 \int x \, dx}{4}\\ &=\frac {3 x^2}{8}-i x^3-\frac {3 x^4}{8}+\frac {3 \cos ^2(x)}{8}-\frac {3}{4} x^2 \cos ^2(x)-x^3 \cot (x)+3 x^2 \log \left (1-e^{2 i x}\right )+\frac {3}{4} x \cos (x) \sin (x)-\frac {1}{2} x^3 \cos (x) \sin (x)-6 \int x \log \left (1-e^{2 i x}\right ) \, dx\\ &=\frac {3 x^2}{8}-i x^3-\frac {3 x^4}{8}+\frac {3 \cos ^2(x)}{8}-\frac {3}{4} x^2 \cos ^2(x)-x^3 \cot (x)+3 x^2 \log \left (1-e^{2 i x}\right )-3 i x \text {Li}_2\left (e^{2 i x}\right )+\frac {3}{4} x \cos (x) \sin (x)-\frac {1}{2} x^3 \cos (x) \sin (x)+3 i \int \text {Li}_2\left (e^{2 i x}\right ) \, dx\\ &=\frac {3 x^2}{8}-i x^3-\frac {3 x^4}{8}+\frac {3 \cos ^2(x)}{8}-\frac {3}{4} x^2 \cos ^2(x)-x^3 \cot (x)+3 x^2 \log \left (1-e^{2 i x}\right )-3 i x \text {Li}_2\left (e^{2 i x}\right )+\frac {3}{4} x \cos (x) \sin (x)-\frac {1}{2} x^3 \cos (x) \sin (x)+\frac {3}{2} \operatorname {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^{2 i x}\right )\\ &=\frac {3 x^2}{8}-i x^3-\frac {3 x^4}{8}+\frac {3 \cos ^2(x)}{8}-\frac {3}{4} x^2 \cos ^2(x)-x^3 \cot (x)+3 x^2 \log \left (1-e^{2 i x}\right )-3 i x \text {Li}_2\left (e^{2 i x}\right )+\frac {3}{2} \text {Li}_3\left (e^{2 i x}\right )+\frac {3}{4} x \cos (x) \sin (x)-\frac {1}{2} x^3 \cos (x) \sin (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 104, normalized size = 0.93 \[ \frac {1}{16} \left (48 i x \text {Li}_2\left (e^{-2 i x}\right )+24 \text {Li}_3\left (e^{-2 i x}\right )-6 x^4+16 i x^3-4 x^3 \sin (2 x)-16 x^3 \cot (x)+48 x^2 \log \left (1-e^{-2 i x}\right )-6 x^2 \cos (2 x)+6 x \sin (2 x)+3 \cos (2 x)-2 i \pi ^3\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.51, size = 244, normalized size = 2.18 \[ \frac {4 \, {\left (2 \, x^{3} - 3 \, x\right )} \cos \relax (x)^{3} + 24 \, x^{2} \log \left (\cos \relax (x) + i \, \sin \relax (x) + 1\right ) \sin \relax (x) + 24 \, x^{2} \log \left (\cos \relax (x) - i \, \sin \relax (x) + 1\right ) \sin \relax (x) + 24 \, x^{2} \log \left (-\cos \relax (x) + i \, \sin \relax (x) + 1\right ) \sin \relax (x) + 24 \, x^{2} \log \left (-\cos \relax (x) - i \, \sin \relax (x) + 1\right ) \sin \relax (x) - 48 i \, x {\rm Li}_2\left (\cos \relax (x) + i \, \sin \relax (x)\right ) \sin \relax (x) + 48 i \, x {\rm Li}_2\left (\cos \relax (x) - i \, \sin \relax (x)\right ) \sin \relax (x) + 48 i \, x {\rm Li}_2\left (-\cos \relax (x) + i \, \sin \relax (x)\right ) \sin \relax (x) - 48 i \, x {\rm Li}_2\left (-\cos \relax (x) - i \, \sin \relax (x)\right ) \sin \relax (x) - 12 \, {\left (2 \, x^{3} - x\right )} \cos \relax (x) - 3 \, {\left (2 \, x^{4} + 2 \, {\left (2 \, x^{2} - 1\right )} \cos \relax (x)^{2} - 2 \, x^{2} + 1\right )} \sin \relax (x) + 48 \, {\rm polylog}\left (3, \cos \relax (x) + i \, \sin \relax (x)\right ) \sin \relax (x) + 48 \, {\rm polylog}\left (3, \cos \relax (x) - i \, \sin \relax (x)\right ) \sin \relax (x) + 48 \, {\rm polylog}\left (3, -\cos \relax (x) + i \, \sin \relax (x)\right ) \sin \relax (x) + 48 \, {\rm polylog}\left (3, -\cos \relax (x) - i \, \sin \relax (x)\right ) \sin \relax (x)}{16 \, \sin \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{3} \cos \relax (x)^{2} \cot \relax (x)^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 150, normalized size = 1.34 \[ -\frac {3 x^{4}}{8}+\frac {i \left (4 x^{3}+6 i x^{2}-6 x -3 i\right ) {\mathrm e}^{2 i x}}{32}-\frac {i \left (4 x^{3}-6 i x^{2}-6 x +3 i\right ) {\mathrm e}^{-2 i x}}{32}-\frac {2 i x^{3}}{{\mathrm e}^{2 i x}-1}-2 i x^{3}+3 x^{2} \ln \left (1+{\mathrm e}^{i x}\right )-6 i x \polylog \left (2, -{\mathrm e}^{i x}\right )+6 \polylog \left (3, -{\mathrm e}^{i x}\right )+3 x^{2} \ln \left (1-{\mathrm e}^{i x}\right )-6 i x \polylog \left (2, {\mathrm e}^{i x}\right )+6 \polylog \left (3, {\mathrm e}^{i x}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int x^3\,{\cos \relax (x)}^2\,{\mathrm {cot}\relax (x)}^2 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{3} \cos ^{2}{\relax (x )} \cot ^{2}{\relax (x )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________